package cn.jbooter.shiro.autoconfigure.config;

import java.util.LinkedHashMap;
import java.util.Map;

import javax.servlet.Filter;

/**
 * 自定义shiro过滤器,用于添加自定义的shiro过滤器
 * 使用示例:
 * @Bean
 * public CustomShiroFilterDefinition customShiroFilterDefinition() {
 * 		CustomShiroFilterDefinition filterDefinition = new CustomShiroFilterDefinition();
 * 		filterDefinition.addPathDefinition("filtername1", filter1);
 * 		filterDefinition.addPathDefinition("filtername2", filter2);
 * 		return chainDefinition;
 *	}
 * 
 * @author HeJian
 *
 */
public class CustomShiroFilterDefinition {
	private Map<String,Filter> customShiroFilterMap = new LinkedHashMap<String,Filter>();
	
	public Map<String,Filter> getCustomShiroFilterMap(){
		return customShiroFilterMap;
	}
	
	public void setCustomShiroFilterMap(Map<String, Filter> customShiroFilterMap) {
		this.customShiroFilterMap = customShiroFilterMap;
	}

	public void addCustomShiroFilter(String filterName,Filter filter) {
		customShiroFilterMap.put(filterName, filter);
	}
}
